-
Notifications
You must be signed in to change notification settings - Fork 5
Packaging and example data download module #119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #119 +/- ##
==========================================
- Coverage 69.75% 64.12% -5.64%
==========================================
Files 4 5 +1
Lines 1025 1115 +90
==========================================
Hits 715 715
- Misses 310 400 +90 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
72a9ac5 to
7b0c0fc
Compare
|
test package at https://test.pypi.org/project/pydartdiags/0.6.2/ |
mjs2369
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've read through all the code and everything looks correct; I've been testing the various methods of getting the data with a small tester program that simply calls get_example_data on a file and prints the result.
All of the methods to get the data if it's already downloaded are working great:
# 1. Check development location (for contributors/developers)
# 2. Check environment variable
# 3. Check cache directory
But the automatic download is failing for me with:
Error downloading data: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1081)>
It does not make it to the "Download complete" print in 158 so it has to be failing in the URL request line:
urllib.request.urlretrieve(ZENODO_RECORD_URL, archive_file)
I have the certifi install in my py-dart env though:
(py-dart) masmith@CISL-DUNCAN pydartdiags % python -m certifi
/Users/masmith/Desktop/py-dart/lib/python3.14/site-packages/certifi/cacert.pem
I'm using the packaging branch on my editable install, so I have all the code changes as well.
|
Thanks for the review Marlee, I am trying to reproduce the error and am unable to. VPN, no VPN, on Derecho. With the error do you get the message about a manual download? (I will break the download code to check the message appears). |
|
Just noticed you are on python 3.14, I will check this. |
|
@hkershaw-brown I do get the message about a manual download. Here is the full message: |
|
I cannot reproduce the error, do you think the message is sufficient for people having SSL problems? |
Yes I think that is fine. The manual download is very easy. I'll approve this |
data.py module for managing download of example data. The example data is too big for pypi so is stored on Zenodo Try data directory (local installs) Envinment variable (can be used to point to example data) Zenodo (downloads example data to users home directory) fixes #108
34bed3d to
765d239
Compare
This pull request adds a module data.py for managing download of example data to allow people to run the examples without the need to clone the repo or manually download the example files.
The example data is too big for pypi so is stored on Zenodo: https://zenodo.org/records/18135062
The get_example_data function:
fixes #61
fixes #108
Setup.py has been removed and pyproject.toml updated. The package can still be installed in editable mode (pip install -e .)
fixes #110